/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ch02;

/**
 *
 * @author Administrator
 */
public class Sum1 {
    public static void main(String args[]){
       int sum=0;
       for(int i=100;i<=200;i++){
           sum=sum+i;
       }
       //System.out.println(sum);
       System.out.println("sum="+sum);
       
       sum=0;
       for(int i=300;i<=500;i++){
           sum=sum+i;
       }
       //System.out.println(sum);
       System.out.println("sum="+sum);
       sum=0;
       for(int i=700;i<=900;i++){
           sum=sum+i;
       }
       //System.out.println(sum);
       System.out.println("sum="+sum);
    }
    
}
